Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(button): ripples blocking mouse events on user content #4526

Merged
merged 2 commits into from
May 15, 2017

Conversation

devversion
Copy link
Member

  • The ripple overlay intercepts all mouse events on the user content and therefore users are not able to have interactive elements in their buttons.
    Normally buttons should not contain interactive elements inside, but since the fix is very easy it wouldn't hurt fixing it.

  • Removing the (touchstart) event that should prevent initial clicks because it didn't do anything (because of pointer-events: none) and the initial click doesn't
    seem to happen anymore.

Related to #4503

* The ripple overlay intercepts all mouse events on the user content and therefore users are not able to have interactive elements in their buttons.
   Normally buttons should not contain interactive elements inside, but since the fix is very easy it wouldn't hurt fixing it.

* Removing the `(touchstart)` event that should prevent initial clicks because it didn't do anything (because of pointer-events: none) and the initial click doesn't
   seem to happen anymore.

Related to angular#4503
@devversion devversion requested a review from crisbeto May 13, 2017 09:48
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label May 13, 2017
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one minor note.

// Disable pointer events for the ripple container and focus overlay because the container
// will overlay the user content and we don't want to disable mouse events on the user content.
// Pointer events can be safely disabled because the ripple trigger element is the host element.
pointer-events: none;
}

// Overlay to be used as a tint. Note that the same effect can be achieved by using a pseudo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment here needs to be updated as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@devversion devversion added the action: merge The PR is ready for merge by the caretaker label May 13, 2017
@jelbourn
Copy link
Member

LGTM

@jelbourn jelbourn merged commit 9c4d601 into angular:master May 15, 2017
@devversion devversion deleted the fix/user-content-pointer branch May 26, 2017 09:30
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants